package com.animals.cat.catController;


import org.springframework.web.bind.annotation.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@RestController
@RequestMapping("/cat")
public class MyCatController {

  private final Logger logger = LoggerFactory.getLogger(getClass());

  @RequestMapping(value = "/add" ,method = RequestMethod.GET)
  public Integer add(@RequestParam Integer a, @RequestParam Integer b) {
    logger.warn("cat add");
    Integer r = a + b;
    return r;
  }

  @RequestMapping(value = "/testpost",method = RequestMethod.POST)
  String testPost(@RequestBody String a){
    logger.warn("cat testpost");
    return "hello,testpost"+a;
  }




}
